完美解决lftp遇到put: Access failed: 553 Could not create file.

您所在的位置:网站首页 test file could not be created 完美解决lftp遇到put: Access failed: 553 Could not create file.

完美解决lftp遇到put: Access failed: 553 Could not create file.

2024-07-05 09:19| 来源: 网络整理| 查看: 265

 目录

一、问题

二、原因

三、解决方法

一、问题

put: Access failed: 553 Could not create file.

二、原因

(1)没有关闭SeLinux

(2)linux默认安装vsftp服务之后只允许匿名用户的访问和下载,不支持上传。

三、解决方法

方法一:

关闭SeLinux

setenforce 0

使用vim命令编写 /etc/sysconfig/selinux,修改为SELINUX=disabled 

vim /etc/sysconfig/selinux

试下能不能上传文件了,不成功使用方法二。

方法二:

修改文件vsftpd.conf

vi /etc/vsftpd/vsftpd.conf

进入后会发现很多注释(带#的),需要修改如下内容,但是很麻烦,建议直接全部删除,直接输入如下内容。

write_enable=YES anon_umask=022 anonymous_enable=YES anon_upload_enable=YES anon_mkdir_write_enable=YES anon_other_write_enable=YES dirmessage_enable=YES xferlog_enable=YES connect_from_port_20=YES xferlog_std_format=YES listen=YES pam_service_name=vsftpd userlist_enable=YES tcp_wrappers=YES

编辑完成后保存退出,重新启动vsftp服务。

systemctl restart vsftpd

如果都没有成功,使用下面方法。

getsebool -a | grep ftp

setsebool -P allow_ftpd_anon_write on setsebool -P allow_ftpd_full_access on

好了,快去试下吧~



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3